3.49 \(\int \frac{(a+b \log (c (d+e x)^n))^2}{(f+g x)^2} \, dx\)

Optimal. Leaf size=132 \[ -\frac{2 b^2 e n^2 \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right )}{g (e f-d g)}-\frac{2 b e n \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g (e f-d g)}+\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)} \]

[Out]

((d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/((e*f - d*g)*(f + g*x)) - (2*b*e*n*(a + b*Log[c*(d + e*x)^n])*Log[(e*
(f + g*x))/(e*f - d*g)])/(g*(e*f - d*g)) - (2*b^2*e*n^2*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/(g*(e*f - d*
g))

________________________________________________________________________________________

Rubi [A]  time = 0.0883066, antiderivative size = 132, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {2397, 2394, 2393, 2391} \[ -\frac{2 b^2 e n^2 \text{PolyLog}\left (2,-\frac{g (d+e x)}{e f-d g}\right )}{g (e f-d g)}-\frac{2 b e n \log \left (\frac{e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g (e f-d g)}+\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x) (e f-d g)} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Log[c*(d + e*x)^n])^2/(f + g*x)^2,x]

[Out]

((d + e*x)*(a + b*Log[c*(d + e*x)^n])^2)/((e*f - d*g)*(f + g*x)) - (2*b*e*n*(a + b*Log[c*(d + e*x)^n])*Log[(e*
(f + g*x))/(e*f - d*g)])/(g*(e*f - d*g)) - (2*b^2*e*n^2*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/(g*(e*f - d*
g))

Rule 2397

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_))^2, x_Symbol] :> Simp[((d +
e*x)*(a + b*Log[c*(d + e*x)^n])^p)/((e*f - d*g)*(f + g*x)), x] - Dist[(b*e*n*p)/(e*f - d*g), Int[(a + b*Log[c*
(d + e*x)^n])^(p - 1)/(f + g*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] && GtQ[p, 0
]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(f+g x)^2} \, dx &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{(2 b e n) \int \frac{a+b \log \left (c (d+e x)^n\right )}{f+g x} \, dx}{e f-d g}\\ &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g (e f-d g)}+\frac{\left (2 b^2 e^2 n^2\right ) \int \frac{\log \left (\frac{e (f+g x)}{e f-d g}\right )}{d+e x} \, dx}{g (e f-d g)}\\ &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g (e f-d g)}+\frac{\left (2 b^2 e n^2\right ) \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{g x}{e f-d g}\right )}{x} \, dx,x,d+e x\right )}{g (e f-d g)}\\ &=\frac{(d+e x) \left (a+b \log \left (c (d+e x)^n\right )\right )^2}{(e f-d g) (f+g x)}-\frac{2 b e n \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac{e (f+g x)}{e f-d g}\right )}{g (e f-d g)}-\frac{2 b^2 e n^2 \text{Li}_2\left (-\frac{g (d+e x)}{e f-d g}\right )}{g (e f-d g)}\\ \end{align*}

Mathematica [A]  time = 0.0835671, size = 126, normalized size = 0.95 \[ \frac{2 b^2 e n^2 (f+g x) \text{PolyLog}\left (2,\frac{g (d+e x)}{d g-e f}\right )-\left (a+b \log \left (c (d+e x)^n\right )\right ) \left (a g (d+e x)+b g (d+e x) \log \left (c (d+e x)^n\right )-2 b e n (f+g x) \log \left (\frac{e (f+g x)}{e f-d g}\right )\right )}{g (f+g x) (d g-e f)} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Log[c*(d + e*x)^n])^2/(f + g*x)^2,x]

[Out]

(-((a + b*Log[c*(d + e*x)^n])*(a*g*(d + e*x) + b*g*(d + e*x)*Log[c*(d + e*x)^n] - 2*b*e*n*(f + g*x)*Log[(e*(f
+ g*x))/(e*f - d*g)])) + 2*b^2*e*n^2*(f + g*x)*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)])/(g*(-(e*f) + d*g)*(f
+ g*x))

________________________________________________________________________________________

Maple [C]  time = 0.77, size = 1092, normalized size = 8.3 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*ln(c*(e*x+d)^n))^2/(g*x+f)^2,x)

[Out]

-I/g*n*e/(d*g-e*f)*ln(g*x+f)*b^2*Pi*csgn(I*c*(e*x+d)^n)^3-I/(g*x+f)/g*ln((e*x+d)^n)*b^2*Pi*csgn(I*(e*x+d)^n)*c
sgn(I*c*(e*x+d)^n)^2-I/(g*x+f)/g*ln((e*x+d)^n)*b^2*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-b^2/(g*x+f)/g*ln((e*x+d)
^n)^2+I/(g*x+f)/g*ln((e*x+d)^n)*b^2*Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I/g*n*e/(d*g-e*f)*ln(e*
x+d)*b^2*Pi*csgn(I*c*(e*x+d)^n)^3-2*b/(g*x+f)/g*ln((e*x+d)^n)*a-2/(g*x+f)/g*ln((e*x+d)^n)*b^2*ln(c)-1/4*(-I*b*
Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I*b*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2+I*b*Pi*csgn(I*(e*x+d
)^n)*csgn(I*c*(e*x+d)^n)^2-I*b*Pi*csgn(I*c*(e*x+d)^n)^3+2*b*ln(c)+2*a)^2/(g*x+f)/g-2*b^2/g*n^2*e/(d*g-e*f)*ln(
g*x+f)*ln(((g*x+f)*e+d*g-f*e)/(d*g-e*f))-I/g*n*e/(d*g-e*f)*ln(e*x+d)*b^2*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)
^n)^2-2*b^2/g*n^2*e/(d*g-e*f)*dilog(((g*x+f)*e+d*g-f*e)/(d*g-e*f))+b^2/g*n^2*e/(d*g-e*f)*ln(e*x+d)^2+I/g*n*e/(
d*g-e*f)*ln(g*x+f)*b^2*Pi*csgn(I*c)*csgn(I*c*(e*x+d)^n)^2-2*b/g*n*e/(d*g-e*f)*ln(e*x+d)*a+I/g*n*e/(d*g-e*f)*ln
(g*x+f)*b^2*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)^2-I/g*n*e/(d*g-e*f)*ln(e*x+d)*b^2*Pi*csgn(I*c)*csgn(I*c*(
e*x+d)^n)^2-2*b^2/g*n*e*ln((e*x+d)^n)/(d*g-e*f)*ln(e*x+d)+2*b^2/g*n*e*ln((e*x+d)^n)/(d*g-e*f)*ln(g*x+f)+2*b/g*
n*e/(d*g-e*f)*ln(g*x+f)*a-2/g*n*e/(d*g-e*f)*ln(e*x+d)*b^2*ln(c)+2/g*n*e/(d*g-e*f)*ln(g*x+f)*b^2*ln(c)-I/g*n*e/
(d*g-e*f)*ln(g*x+f)*b^2*Pi*csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I/g*n*e/(d*g-e*f)*ln(e*x+d)*b^2*Pi*
csgn(I*c)*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n)+I/(g*x+f)/g*ln((e*x+d)^n)*b^2*Pi*csgn(I*c*(e*x+d)^n)^3

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} 2 \, a b e n{\left (\frac{\log \left (e x + d\right )}{e f g - d g^{2}} - \frac{\log \left (g x + f\right )}{e f g - d g^{2}}\right )} - b^{2}{\left (\frac{\log \left ({\left (e x + d\right )}^{n}\right )^{2}}{g^{2} x + f g} - \int \frac{e g x \log \left (c\right )^{2} + d g \log \left (c\right )^{2} + 2 \,{\left (e f n + d g \log \left (c\right ) +{\left (e g n + e g \log \left (c\right )\right )} x\right )} \log \left ({\left (e x + d\right )}^{n}\right )}{e g^{3} x^{3} + d f^{2} g +{\left (2 \, e f g^{2} + d g^{3}\right )} x^{2} +{\left (e f^{2} g + 2 \, d f g^{2}\right )} x}\,{d x}\right )} - \frac{2 \, a b \log \left ({\left (e x + d\right )}^{n} c\right )}{g^{2} x + f g} - \frac{a^{2}}{g^{2} x + f g} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))^2/(g*x+f)^2,x, algorithm="maxima")

[Out]

2*a*b*e*n*(log(e*x + d)/(e*f*g - d*g^2) - log(g*x + f)/(e*f*g - d*g^2)) - b^2*(log((e*x + d)^n)^2/(g^2*x + f*g
) - integrate((e*g*x*log(c)^2 + d*g*log(c)^2 + 2*(e*f*n + d*g*log(c) + (e*g*n + e*g*log(c))*x)*log((e*x + d)^n
))/(e*g^3*x^3 + d*f^2*g + (2*e*f*g^2 + d*g^3)*x^2 + (e*f^2*g + 2*d*f*g^2)*x), x)) - 2*a*b*log((e*x + d)^n*c)/(
g^2*x + f*g) - a^2/(g^2*x + f*g)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b^{2} \log \left ({\left (e x + d\right )}^{n} c\right )^{2} + 2 \, a b \log \left ({\left (e x + d\right )}^{n} c\right ) + a^{2}}{g^{2} x^{2} + 2 \, f g x + f^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))^2/(g*x+f)^2,x, algorithm="fricas")

[Out]

integral((b^2*log((e*x + d)^n*c)^2 + 2*a*b*log((e*x + d)^n*c) + a^2)/(g^2*x^2 + 2*f*g*x + f^2), x)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (a + b \log{\left (c \left (d + e x\right )^{n} \right )}\right )^{2}}{\left (f + g x\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*ln(c*(e*x+d)**n))**2/(g*x+f)**2,x)

[Out]

Integral((a + b*log(c*(d + e*x)**n))**2/(f + g*x)**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}^{2}}{{\left (g x + f\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*log(c*(e*x+d)^n))^2/(g*x+f)^2,x, algorithm="giac")

[Out]

integrate((b*log((e*x + d)^n*c) + a)^2/(g*x + f)^2, x)